x86/HVM: avoid reading ioreq state more than once
authorJan Beulich <jbeulich@suse.com>
Thu, 17 Dec 2015 13:22:46 +0000 (14:22 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 17 Dec 2015 13:22:46 +0000 (14:22 +0100)
commitb452430a4cdfc801fa4bc391aed7522365e1deb6
treef2f42f668ed3a6c445c04efc0b64fbc056636ae1
parent81818b3f277544535974204f8d840da86fa8a44f
x86/HVM: avoid reading ioreq state more than once

Otherwise, especially when the compiler chooses to translate the
switch() to a jump table, unpredictable behavior (and in the jump table
case arbitrary code execution) can result.

This is XSA-166.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/x86/hvm/hvm.c